package com.yitongmao.util;

import android.content.Context;
import android.media.MediaScannerConnection;
import android.net.Uri;

/**
 * Created by xiaowei on 16/5/12.
 */
public class MediaLibraryUtils {
    //filename是我们的文件全名，包括后缀哦
    public static void updateMediaLibrary(Context context, String filename) {
        MediaScannerConnection.scanFile(context,
                new String[]{filename}, null,
                new MediaScannerConnection.OnScanCompletedListener() {
                    public void onScanCompleted(String path, Uri uri) {
                        Loger.i("ExternalStorage", "Scanned " + path + ":");
                        Loger.i("ExternalStorage", "-> uri=" + uri);
                    }
                });
    }
}
